<?php
class QuickMail {
    private static $from = 'robot@motivator.dev';

    public static function send( $to, $subject, $message, $from = null ) {
	if( empty($from) ) $from = self::$from;
	self::sendmail($to, $from, $subject, $message);
    }
    
    private static function sendmail( $to, $from, $subject, $message ) {
	$headers = "From: {$from}\r\n" .
	"Reply-To: {$from}\r\n" .
	'X-Mailer: QuickMail-PHP/' . phpversion();

	mail($to, $subject, $message, $headers);
    }
}
?>